const Url = require('url-parse')
let str = 'https://git-scm.com/search/results?search=gitignore&name=zs'

let obj = Url(str,true)
console.log(obj)